package com.rent.business;

import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.archaius.ArchaiusAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @Author zn
 * @Create 2025-03-03 16:21
 * @Version 1.0
 */
// 开启事务
@EnableTransactionManagement
// 开启aop
@EnableAspectJAutoProxy(exposeProxy = true)
// 服务注册
@EnableDiscoveryClient
@ComponentScan(basePackages = {
        "org.springframework.security.oauth2.config.annotation.configuration",
        "com.database",
        "com.security",
        "com.log",
        "com.rent"})
// 不要自动装配数据连接池
@SpringBootApplication(exclude = {DruidDataSourceAutoConfigure.class, ArchaiusAutoConfiguration.class})
public class BusinessApplication {

    public static void main(String[] args) {
        SpringApplication.run(BusinessApplication.class,args);
    }
}
